﻿using System;
using System.Collections.Generic;
using System.Web;

using Microsoft.Health.Events;

/// <summary>
/// Summary description for SubscriptionManagerExtension
/// </summary>
public static class SubscriptionManagerExtension
{
    public static Subscription GetSubscription(SubscriptionManager manager, Guid subscriptionId)
    {
        foreach (Subscription subscription in manager.GetSubscriptions())
        {
            if (subscription.CommonSubscriptionData.Id == subscriptionId)
            {
                return subscription;
            }
        }

        return null;
    }
}